package com.conv.shop.business.req;

import jakarta.validation.constraints.NotNull;

import java.util.Date;

public class CartUpdateReq {
    private Integer shoppingCartId;

    private Integer consumerId;

    private Integer number;

    private Integer selected = 1;

    private Date addToCartTime;

    private Date lastUpdateTime = new Date(System.currentTimeMillis());
    @NotNull(message = "productId不能为空")
    private Integer productId;

    public Integer getShoppingCartId() {
        return shoppingCartId;
    }

    public void setShoppingCartId(Integer shoppingCartId) {
        this.shoppingCartId = shoppingCartId;
    }

    public Integer getConsumerId() {
        return consumerId;
    }

    public void setConsumerId(Integer consumerId) {
        this.consumerId = consumerId;
    }

    public Integer getNumber() {
        return number;
    }

    public void setNumber(Integer number) {
        this.number = number;
    }

    public Integer getSelected() {
        return selected;
    }

    public void setSelected(Integer selected) {
        this.selected = selected;
    }

    public Date getAddToCartTime() {
        return addToCartTime;
    }

    public void setAddToCartTime(Date addToCartTime) {
        this.addToCartTime = addToCartTime;
    }

    public Date getLastUpdateTime() {
        return lastUpdateTime;
    }

    public void setLastUpdateTime(Date lastUpdateTime) {
        this.lastUpdateTime = lastUpdateTime;
    }

    public Integer getProductId() {
        return productId;
    }

    public void setProductId(Integer productId) {
        this.productId = productId;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", shoppingCartId=").append(shoppingCartId);
        sb.append(", consumerId=").append(consumerId);
        sb.append(", number=").append(number);
        sb.append(", selected=").append(selected);
        sb.append(", addToCartTime=").append(addToCartTime);
        sb.append(", lastUpdateTime=").append(lastUpdateTime);
        sb.append(", productId=").append(productId);
        sb.append("]");
        return sb.toString();
    }
}